﻿@model Data.Web.Images

@{
    var Media = System.Configuration.ConfigurationManager.AppSettings["Media"];

 
    ViewBag.Title = "Edit";
} 

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>   <img class="img-responsive" src="@Html.Raw(Media + "Thumbnail/" + Model.Url)">
               </legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Url)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Url)
            @Html.ValidationMessageFor(model => model.Url)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Width)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Width)
            @Html.ValidationMessageFor(model => model.Width)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Height)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Height)
            @Html.ValidationMessageFor(model => model.Height)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FileType)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FileType)
            @Html.ValidationMessageFor(model => model.FileType)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CateId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CateId)
            @Html.ValidationMessageFor(model => model.CateId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CateName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CateName)
            @Html.ValidationMessageFor(model => model.CateName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserId)
            @Html.ValidationMessageFor(model => model.UserId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Thumbnail)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Thumbnail)
            @Html.ValidationMessageFor(model => model.Thumbnail)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.OrderBy)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OrderBy)
            @Html.ValidationMessageFor(model => model.OrderBy)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
